import request from '@/utils/request'

// 创建学校专业信息
export function createSchoolMajor(data) {
  return request({
    url: '/system/school-major/create',
    method: 'post',
    data: data
  })
}

// 更新学校专业信息
export function updateSchoolMajor(data) {
  return request({
    url: '/system/school-major/update',
    method: 'put',
    data: data
  })
}

// 删除学校专业信息
export function deleteSchoolMajor(id) {
  return request({
    url: '/system/school-major/delete?id=' + id,
    method: 'delete'
  })
}

// 获得学校专业信息
export function getSchoolMajor(id) {
  return request({
    url: '/system/school-major/get?id=' + id,
    method: 'get'
  })
}

// 获得学校专业信息分页
export function getSchoolMajorPage(query) {
  return request({
    url: '/system/school-major/page',
    method: 'get',
    params: query
  })
}

// 导出学校专业信息 Excel
export function exportSchoolMajorExcel(query) {
  return request({
    url: '/system/school-major/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
